package com.ruoyi.resturant.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@ApiModel(value = "学生", description = "学生信息")
public class Student {
    @ApiModelProperty("编号")
    private Long id;
    @ApiModelProperty("学号")
    @NotNull(message="学号不存在")
    private String sno;
    @ApiModelProperty("姓名")
    @NotBlank(message = "学生名称不能为空")
    @Size(min = 2, max = 6, message = "学生名称长度必须在2到6个字符之间")
    private String name;
    @ApiModelProperty("性别")
    private String sex;
    public long getId() {
        return id;
    }
    public void setId(long id) {
        this.id = id;
    }
    public String getSno() {
        return sno;
    }
    public void setSno(String sno){this.sno=sno;}
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
}
